<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <title>提交订单</title>
    <div data-th-replace="layout/head"></div>
</head>
<body>
<!-- top bar -->
<header class="bar bar-nav">
    <a class="button button-link button-nav pull-left goBack" onclick="window.history.go(-1)" href="javascript:void(0);">
        <span class="iconfont icon-fanhui"></span>
    </a>
    <h1 class="title">提交订单</h1>
</header>
<!-- top bar end-->
<input type="hidden" id="shopData" th:value="${shopData}"/>
<input type="hidden" id="orderType" th:value="${orderType}"/>
<input type="hidden" id="payType" value=""/>
<input type="hidden" id="orderNo" th:value="${orderNo}"/>
<!--menu begin-->
<nav class="bar bar-tab course-info-bar-tab wm-bar-tab-bx">
    <a class="tab-item external ml5" href="#">
        <span class="fs4 c-333">实付</span>
        <span class="fs6 c-red">￥</span>
        <span class="c-red" id="real-price" style="font-size: 1rem;">0.00</span>
    </a>
    <a id="go-to-pay" class="tab-item external cInfo-price-bx wmGoToPay" href="javascript:void(0);">
        <span> 去支付 </span>
    </a>
</nav>
<!--menu end-->

<!--主体区域 开始-->
<article class="content wm-content order-content">
    <!-- 商品区，开始 -->
    <div>
        <div class="card">
            <section class="card-header">
                <span><em class="c-bbb iconfont icon-shangpin"></em> 商品信息</span>
            </section>
            <section class="card-content">
                <div class="list-block media-list">
                    <ul class="order-course-list" id="mobile-shop-list-bx">

                    </ul>
                </div>
            </section>
            <section class="card-footer">
                <span class="fs7 c-666">
                    <b class="sumPrice"><b id="shop-num-box">0</b>个</b>商品
                </span>
                <aside class="text-right">
                    <span class="fs7 c-666 hide">会员立减<small class="fs4 ml5">￥</small>
                        <b class="sumPrice" id="memberSubPrice">0.00</b>
                    </span>
                    <br>
                    <span class="fs7 c-666">小计<small class="fs4 ml5">￥</small>
                    <b class="sumPrice" id="shop-price-box">0.00</b>
                    </span>
                </aside>
            </section>
        </div>
    </div>
    <section class="wm-line"></section>
    <!-- 商品区，结束 -->

    <!-- 活动/优惠券，开始 -->
    <div class="yh-div-box hide">
        <div class="card">
            <section class="card-header">
                <span><em class="c-bbb iconfont icon-youhuiquan"></em> 优惠/活动</span>
            </section>
            <section class="card-content">
                <div class="list-block media-list">
                    <ul class="order-course-list">
                        <li class="item-content item-link" style="display: none;" id="hou-dong-bx">
                            <div class="item-inner">
                                <div class="item-title">限时活动</div>
                                <div class="item-input text-right">
                                    <input style="text-align: right" placeholder="请选择限时活动..." id="huoDong" readonly="readonly" type="text"/>
                                </div>
                            </div>
                        </li>
                        <li class="item-content item-link" style="display: none;" id="you-hui-quan-bx">
                            <div class="item-inner">
                                <div class="item-title">优惠券</div>
                                <div class="item-input text-right">
                                    <input style="text-align: right" placeholder="请选择优惠券..." id="youhuiQuan" readonly="readonly" type="text"/>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
            </section>
        </div>
    </div>
    <section th:if="${orderType}=='COMMON'" class="wm-line yh-div-box hide"></section>
    <!-- 活动/优惠券，结束 -->
    <!-- 支付方式，开始 -->
    <div>
        <div class="card">
            <section class="card-header">
                <span><em class="c-888 iconfont icon-iconzhenghe072907"></em> 支付方式</span>
            </section>
            <section class="card-content">
                <div class="list-block media-list">
                    <ul class="order-course-list" id="pay-list-box">
                        <li th:if="${orderType}=='COMMON' and !${#maps.isEmpty(userAccount)}" class="item-content" data-status="1" data-type="ACCOUNT" id="user-account-box">
                            <input type="hidden" id="balance" th:value="${#numbers.formatDecimal(userAccount['balance'],1,2,'POINT')}"/>
                            <div class="item-media">
                                <span class="c-red c-bbb" id="account-balance-box"><!-- c-bbb -->
                                    <em class="iconfont icon-yue" style="font-size: 1rem;"></em>
                                </span>
                            </div>
                            <div class="item-inner">
                                <div class="item-title">
                                    <span class="wm-cm-title" id="user-account-title-bx">账户余额</span>
                                    <span class="c-333" th:text="'￥'+(${userAccount['balance']}!=null?${#numbers.formatDecimal(userAccount['balance'],1,2,'POINT')}:0)"></span>
                                </div>
                                <div class="item-after">
                                    <span class="dc-icon-bx ok-icon-bx dc-small-icon-bx"><em class="iconfont icon-duihao"></em></span>
                                </div>
                            </div>
                        </li>
                        <li th:if="${configMap['weixinStatus']}=='on'" class="item-content" data-status="1" data-type="WEIXIN">
                            <div class="item-media">
                                <span class="c-green"><em class="iconfont icon-winxin" style="font-size: 1rem;"></em></span>
                            </div>
                            <div class="item-inner">
                                <div class="item-title">
                                    <span class="wm-cm-title">微信</span>
                                </div>
                                <div class="item-after">
                                    <span class="dc-icon-bx ok-icon-bx dc-small-icon-bx"><em class="iconfont icon-duihao"></em></span>
                                </div>
                            </div>
                        </li>
                        <li th:if="!${isWeiXin} and ${configMap['alipayStatus']}=='on'" class="item-content" data-status="1" data-type="ALIPAY">
                            <div class="item-media">
                                <span class="c-blue"><em class="iconfont icon-zhifubao" style="font-size: 1rem;"></em></span>
                            </div>
                            <div class="item-inner">
                                <div class="item-title">
                                    <span class="wm-cm-title">支付宝</span>
                                </div>
                                <div class="item-after">
                                    <span class="dc-icon-bx ok-icon-bx dc-small-icon-bx"><em class="iconfont icon-duihao"></em></span>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
            </section>
            <section th:if="${orderType}=='COMMON'" class="card-footer hide" id="account-pay-box">
                <span class="fs6 c-666"><em class="iconfont icon-tanhao fs4"></em> 账户余额不足，选择账户支付<!--，请先充值！（<span class="c-red">选择账户支付</span>）--></span>
                <a th:href="@{/mobile/uc/order/initPayOrder?orderType=ACCOUNT&shopData=0-ACCOUNT-1}">立即充值 <em class="icon icon-right"></em></a>
            </section>
            <div th:if="${orderType}=='COMMON'" class="pl5 pr5 pb5 ml5 mr5"><span class="fs4 c-bbb">点击去支付后，如有优惠券，将和此订单绑定，优惠券将设置成已使用</span></div>
        </div>
    </div>
    <!-- 支付方式，结束 -->
</article>
<!--主体区域 结束-->
<div data-th-replace="layout/footer"></div>
<script type="text/javascript" th:src="@{{path}/front/mobile/business/order/goods/order-init.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/front/mobile/business/order/goods/validate-order-status.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:inline="javascript">
    var shopData = [[${shopData}]];
    var orderType = [[${orderType}]];
</script>
</body>
</html>
